package com.axjy.vo;

import com.axjy.pojo.User;
import com.github.pagehelper.PageInfo;

import java.util.List;

public class Pager {

    private long total;

    private List rows;

    public Pager(){}

    public Pager(PageInfo pageInfo){
        this.setTotal(pageInfo.getTotal());
        this.setRows(pageInfo.getList());
    }

    public Pager(List<?> list){
        PageInfo<?> pageInfo=new PageInfo<>(list);
        this.total=pageInfo.getTotal();
        this.setRows(list);
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List getRows() {
        return rows;
    }

    public void setRows(List rows) {
        this.rows = rows;
    }
}
